//
//  TestProblem217.swift
//  LeetCodeTests
//
//  Created by 武侠 on 2023/6/14.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

class TestProblem217: XCTestCase {
    
    var problem = Problem217()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem217_Case1() throws {
        assert(problem.containsDuplicate([1, 2, 3, 1]))
        assert(problem.containsDuplicate2([1, 2, 3, 1]))
    }
    
    func testProblem217_Case2() throws {
        XCTAssertEqual(problem.containsDuplicate([1, 2, 3, 4]), false)
        XCTAssertEqual(problem.containsDuplicate2([1, 2, 3, 4]), false)
    }
    
    func testProblem217_Case3() throws {
        XCTAssertEqual(problem.containsDuplicate([1,1,1,3,3,4,3,2,4,2]), true)
        XCTAssertEqual(problem.containsDuplicate2([1,1,1,3,3,4,3,2,4,2]), true)
    }
}
